import subprocess

def get_machine_id():
  try:
    result = subprocess.run(["wmic", "csproduct", "get", "UUID"], capture_output=True, text=True)
    if result.returncode == 0:
      lines =result.stdout.strip().split("\n")
      uuid = None
      for line in lines:
        if line.strip() != "" and line.strip() != "UUID":
          uuid = line.strip()
          break
      return uuid
    else:
      return None
  except Exception as e:
    return None

if __name__ == "__main__":
  print(get_machine_id())